import request from '@/utils/request'
// 获取树状机构信息接口
export function getOrgAPI() {
  return request({
    url: '/manager/business-hall/tree',
    method: 'get'
  })
}
// 编辑机构接口
export function editOrgAPI(data) {
  return request({
    url: '/manager/business-hall',
    method: 'post',
    data
  })
}
// 根据机构查询快递员
export function orgCourierAPI(id) {
  return request({
    url: `/manager/business-hall/courier/findByAgencyId/${id}`,
    method: 'get'
  })
}
// 获取员工分页数据接口
export function getUserAPI(params) {
  return request({
    url: `/manager/business-hall/user/page`,
    method: 'get',
    params
  })
}
// 获取机构详情接口
export function getOrgDetailAPI(id) {
  return request({
    url: `/manager/business-hall/${id}`,
    method: 'get'
  })
}
// 获取运费模板列表接口
export function getCarriageAPI() {
  return request({
    url: `/manager/carriages`,
    method: 'get'
  })
}
// 删除运费列表接口
export function delCarriageAPI(id) {
  return request({
    url: `/manager/carriages/${id}`,
    method: 'delete'
  })
}
// 新增和修改运费模板
export function addCarriageAPI(data) {
  return request({
    url: `/manager/carriages`,
    method: 'post',
    data
  })
}
// 获取业务范围接口
export function getScopeAPI(id, type) {
  return request({
    url: `/manager/business-hall/scope/${id}/${type}`
  })
}
